package com.edu.schoolforum.enums;

/**
 * @author tao
 * @date 2021/8/10 23:53
 */
public enum RoleEnum {
    ROLE_VISITOR(4,"ROLE_VISITOR"),
    ROLE_USER(3,"ROLE_USER"),
    ROLE_ADMINISTER(2,"ROLE_ADMINISTER"),
    ROLE_SUPER_ADMINISTER(1,"ROLE_SUPER_ADMINISTER");

    /**
     * 存入数据库的码
     */
    private int id;
    /**
     * 角色名称
     */
    private String name;

    /**
     * 异常码枚举构造器
     *
     * @param name  异常状态信息
     */
    RoleEnum(int id, String name) {
        this.id=id;
        this.name = name;
    }

    public int getId() {
        return id;
    }

    public String getName() {
        return name;
    }
}
